#include "threadplay.h"

threadplay::threadplay()
{
}
threadplay::threadplay(track a, HMIDIOUT hdl)
{
    cNote=0;
    trackNotes = a.trknotes;
    handle = hdl;

}
void threadplay::sleepplay()
{
    for(int i=0;i<trackNotes.size();i++)
    {
        usleep(trackNotes[i].deltaTime*1000);
        midiOutShortMsg(handle,trackNotes[i].message);
    }
}
void threadplay::run()
{
    sleepplay();
}
